package spec.ocl_mcg;

import graph.mcg.CGNode;
import graph.mcg.ConstraintNode;

import org.eclipse.ocl.ecore.BooleanLiteralExp;


public class BooleanLiteralExpNode extends TreeNode implements LeafNode {
	private boolean value;

	public BooleanLiteralExpNode() {
	}

	public BooleanLiteralExpNode(BooleanLiteralExp exp) {
		value = exp.getBooleanSymbol();
		expresult = exp.getBooleanSymbol().toString();
	}

	public boolean isValue() {
		return value;
	}

	public void setValue(boolean value) {
		this.value = value;
	}

	@Override
	public CGNode toCG() {
		// TODO Auto-generated method stub
		ConstraintNode cfgnode = new ConstraintNode(this);
		cfgnode.setConstraint(Boolean.toString(value));
		cfgnode.setNextnode(null);
		return cfgnode;
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return null;
	}

}
